package com.itheima.service;

import com.itheima.entity.TbUser;
import com.itheima.service.impl.ConsumerServiceImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Component
@FeignClient(value = "user-service", fallback = ConsumerServiceImpl.class)
public interface ConsumerService {

    @GetMapping("tbUser/selectOne/{id}")
    TbUser findUserById(@PathVariable("id") Integer id);
}

